package com.yanqu.road.server.cmd.grandchild.born;

import com.yanqu.road.entity.marriage.MarriageRecord;
import com.yanqu.road.pb.grandchild.GrandChildProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.grandson.GrandChildModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;

import java.util.List;

@Cmd(code = GameProtocol.S_STONE_LIST_REQ,desc = "请求三生石列表")
public class GetStoneListCmd extends AbstractCommand {

    private boolean isRefresh;
    private long occupation;
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        GrandChildProto.StoneReqMsg req = GrandChildProto.StoneReqMsg.parseFrom(packet.getBytes());
        isRefresh = req.getIsRefresh();
        occupation = req.getOccupation();
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        player.getModule(GrandChildModule.class).getHoneyMoonList(isRefresh, occupation);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
